package com.admin.mapper;

import com.admin.entity.Permission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author marisheng
 * @since 2019-11-21
 */
public interface PermissionMapper extends BaseMapper<Permission> {

    List<Map> findPermissionByRole();

    int delPermissionByRole(@Param("roleId") int roleId);

    int savePermissionWithRole(@Param("permissionArray") int[] permissionArray, @Param("roleId") int roleId);

    List findPermissionIdByRole(int roleId);

    Map findUrlById(@Param("id") int id);
}
